-
Notifications
You must be signed in to change notification settings - Fork 121
[My Store] Add support for conditionally storing site summary stats #8421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8c5cfd2 to
4fcd0eb
Compare
You can test the changes from this Pull Request by:
|
Generated by 🚫 dangerJS |
Ecarrion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! But now that I think a bit more about the WHY of these changes I think I'm not understanding something 😅
As far as I can tell, this PR is adding the ability to retrieveSiteSummaryStats to store results on the storage layer, right?
But in the PR you say that this is needed for the Dashboard Stats, does that mean that we will be adding this information on the dashboard?
Or did I miss-understood this 😅 ?
The information is already in the dashboard ("Visitors" and "Conversion rate"), but it's showing inaccurate data:
The first approach is inaccurate because visitors are uniques, so the same visitor should only be counted once even if they visit multiple times during the entire period. Since we're using the accurate method in Analytics Hub, I'm fixing it in the Dashboard stats to make sure there aren't inconsistencies between the stats shown on the two screens. |
Part of #8173
⚠️ Depends on #8420 ⚠️
Description
This PR adds support in the Yosemite layer for conditionally storing
SiteSummaryStatsfetched from remote:SiteSummaryStatsfrom storage.saveInStorageparameter toStatsActionV4.retrieveSiteSummaryStatsto determine if stats should be stored.StatsStoreV4to support conditionally upserting stats fetched from remote.Note: For now we only store
SiteSummaryStatsthat are fetched for a single period. The My Store dashboard only needs summary stats for a single period (day, week, month, year) and stats fetched for multiple periods don't need to be stored (used only in the Analytics Hub, for quarter periods).Testing instructions
RELEASE-NOTES.txtif necessary.